import request from '@/utils/request'

// 获取分类列表
export function getCategoryListByPage(params){
    return request.get('/category/list', { params })
}

// 添加分类
export function addCategory(data){
    return request.post('/category', data)
}

// 删除分类
export function deleteCategory(id){
    return request.delete('/category/' + id)
}

// 修改分类
export function updateCategory(data){
    return request.put('/category', data)
}

// 获取全部分类
export function getAllCategory(){
    return request.get('/categorys')
}